Shopping Cart With Order

Shopping Cart

After users add the products to the shopping cart, they complete the order by paying the total amount to be paid.

Example

  • Successful Shopping Cart
{
  "success": true,
  "data": {
    "userId": "5ede2336c5bd290001af8622",
    "appId": "739",
    "culture": "tr-TR",
    "items": [
      {
        "id": "5ede2336c5bd290001af8621",
        "productId": "5ede2336c5bd290001af8621",
        "displayName": "Product 1",
        "quantity": 1,
        "price": 89.95,
        "product": {
          "id": "5ede2336c5bd290001af8621",
          "appId": "739",
          "title": "{<EN>1,66 mb resim<EN>}{<TR>1,66 mb resim<TR>}",
          "featuredImage": {
            "t": "https://mobirollercdn.blob.core.windows.net/applyze/739/ecommerce/products/8ae8657a09e3f305.thumb",
            "n": "https://mobirollercdn.blob.core.windows.net/applyze/739/ecommerce/products/8ae8657a09e3f305.jpg"
          },
          "images": [
            {
              "t": "https://mobirollercdn.blob.core.windows.net/applyze/739/ecommerce/products/8ae8657a09e3f305.thumb",
              "n": "https://mobirollercdn.blob.core.windows.net/applyze/739/ecommerce/products/8ae8657a09e3f305.jpg"
            }
          ],
          "description": "{<EN><!DOCTYPE html>\r\n<html>\r\n<head>\r\n</head>\r\n<body>\r\n<p>1,66 mb resim</p>\r\n
          </body>\r\n</html><EN>}{<TR><!DOCTYPE html>\r\n<html>\r\n<head>\r\n
          </head>\r\n<body>\r\n<p>1,66 mb resim</p>\r\n</body>\r\n</html><TR>}",
          "stock": 113,
          "stockCode": "1.66MB",
          "price": 99.98,
          "currency": "TRY",
          "maxQuantityPerOrder": 4,
          "itemType": "PHYSICAL",
          "campaignPrice": 89.95,
          "shippingPrice": 0,
          "orderIndex": 1,
          "isPublished": true,
          "isActive": true,
          "publishmentDate": "2020-06-08T11:38:28Z",
          "endDate": "2120-06-08T11:37:40Z",
          "createDate": "2020-06-08T11:38:29.144Z",
          "updateDate": "2020-06-08T11:38:29.144Z",
          "useFixPrice": false
        },
        "messages": [
          {
            "key": "UpdatedProduct",
            "message": "UpdatedProduct",
            "type": "Warning"
          }
        ],
        "isValid": false,
        "createDate": "0001-01-01T00:00:00",
        "updateDate": "0001-01-01T00:00:00"
      }
    ],
    "invalidItems": [],
    "messages": [],
    "currency": "TRY",
    "subTotalPrice": 89.95,
    "totalPrice": 89.95,
    "shippingPrice": 0,
    "updateDate": "2020-05-22T07:17:39.605Z",
    "createDate": "2020-05-22T07:17:39.605Z"
  }
}

Order Work Flow

Shopping Cart Database Document Scheme

// collection: ShoppingCarts
{
	"_id" : ObjectId("5eddd4b3c5bd290001af8618"),
	"CreateDate" : ISODate("2020-06-08T09:03:31.545+03:00"),
	"UpdateDate" : ISODate("2020-06-08T09:03:31.545+03:00"),
	"IsActive" : true,
	"AppId" : "1970",
	"UserId" : "5eb6a8aaedb318000172c1ca",
	"Culture" : "en-US",
	"Products" : [
		{
			"_id" : "5ec6f6205f043c00013048c2",
			"Title" : "{<TR>Product s1<TR>}{<EN>Product s1<EN>}",
			"DisplayName" : "Ürün s1",
			"FeaturedImage" : "products/90eadce1c8d73a89.jpg",
			"PaidPrice" : "39.99",
			"Quantity" : 2,
			"Price" : "49.99",
			"CampaignPrice" : "39.99",
			"ShippingPrice" : "0",
			"StockCode" : "URNS01",
			"Currency" : 1,
			"ItemType" : 1,
			"StatusHistory" : [ ],
			"CreatedDate" : ISODate("2020-06-08T09:03:31.536+03:00")
		}
	]
}

Authentication

App-Key authentication scheme is applied for Shopping Cart.

You can use it for controller or action.

Example

[AuthorizeAppKey]  <-- Check App-Key for request in header parameter
public class DefaultController : ControllerBase
{
    /// Action methods
}